package com.jeecms.wicool.manager.image.impl;

import com.jeecms.wicool.dao.image.ImageEntityDao;
import com.jeecms.wicool.entity.image.ImageEntity;
import com.jeecms.wicool.manager.image.ImageEntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by cuiyanlei on 15/6/7.
 */
@Service
@Transactional
public class ImageEntityManagerImpl implements ImageEntityManager{
    @Override
    public ImageEntity deleteById(Integer id) {
        return dao.deleteById(id);
    }

    @Override
    public ImageEntity save(ImageEntity bean) {
        return dao.save(bean);
    }

    @Override
    public List<ImageEntity> getAll(Integer foreginKey, int type) {
        return dao.getAll(foreginKey, type);
    }

    @Autowired
    private ImageEntityDao dao;
}
